<?php 
	include ("config.php");
	$sql_menu = mysql_query("SELECT id,menu FROM tbl_menu ORDER BY ordem ASC");
	$sql_prop = mysql_query("SELECT facebook,twitter FROM tbl_propriedades ");
	list($facebook,$twitter)=mysql_fetch_array($sql_prop);
?>
<style type="text/css">
.divdireita {
	font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
	color:#FFF;
	height:30px;
	width:auto;
	text-align:center;
	padding-top:10px;
	font-size:18px;
}
.lupa{
	border:1px solid #999;
	height:25px;
	font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
	font-size:16px;
}
#lupa{
	cursor:pointer;
}
</style>
<div id="dir">
<div style="height:45px;background-image:url(img/top_menu.png);">
<div class="divdireita">Busca</div></div>
<script type="text/javascript">
function ativa(){
	if(valida() == true){
		document.forms[0].submit();
	}else{
	return	false;
	}
}
function valida(){
		
	x = document.getElementById("busca").value;
	if(x == ''){
		return false;
	}else{
		return true;
	}
	
}
</script>
<form action="index.php?pagina=internas/link_busca.php" onsubmit="return valida();" method="post">
<table>
    <tr>
        <td><input class="lupa" id="busca" size="33" type="text" name="busca"/></td>
        <td><img id="lupa" onclick="ativa();" src="img/icones/lupa.png" /></td>
    </tr>
</table>
</form>

<div style="height:45px;background-image:url(img/top_menu.png);">
<div class="divdireita">Agenda</div></div>
<?php include('internas/agenda.php');  ?>
<!--Bloco do Twitter --------------------------------------------->
<?php if($twitter != ""){?>
<div style="height:45px;background-image:url(img/top_menu.png);">
<div class="divdireita">Twitter</div>
</div>
<?php	
	$t = explode('<script>',base64_decode($twitter));	
	echo $t[0];
	
?>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
<?php } ?>
<!--Bloco do Twitter --------------------------------------------->
<!-- Menu widget Facebook -->
<?php
	if($facebook != ""){
?>
<div style="height:45px;background-image:url(img/top_menu.png);">
<div class="divdireita">Facebook</div></div>
<div class="fb-like-box" data-href="<?php echo $facebook;	?>" data-width="292" data-show-faces="true" data-stream="false" data-show-border="true" data-header="true"></div>

<?php
}
?>
<div style="height:45px;background-image:url(img/top_menu.png);">
<div class="divdireita">Newsletter</div></div>
<a href="index.php?pagina=internas/cadastro.php"><img src="img/imagens/newsletter.jpg" /></a>
</div>
<!-- Menu widget Facebook -->